#include "../include/mempool_2.h"

using namespace mempool_2;

void test1()
{
    clock_t start, end;
    start = clock();
    for (int i = 0; i < 5000000; ++i)
        A *pa = new A();
    end = clock();
    cout << "内存池：申请分配内存的次数: " << A::m_MallocCount << endl;
    cout << end - start << endl;
}

void test2()
{
    clock_t start, end;
    start = clock();
    for (int i = 0; i < 5000000; ++i)
        A *pa = ::new A();
    end = clock();
    cout << end - start << endl;
}

int main()
{
    test1();
    test2();

    return 0;
}
